; Codigo ASM para TPMV
; Tecnología de la Programación - FDI (UCM)
; Marco Antonio Gómez Martín
;
; Inicializa un "array" decreciente de 100 enteros y
; lo escribe por pantalla en una línea. Después
; lo ordena con el método del burbuja y lo vuelve a
; escribir.
;
; El código es generado por un pequeño compilador de terceros.
;
JUMP 1
PUSH 3
STORE 1
PUSH 105
STORE 0
JUMP 262
LOAD 0
PUSH 2
ADD
LOAD 2
STOREIND
LOAD 0
PUSH 3
ADD
STORE 2
LOAD 0
PUSH 4
ADD
STORE 0
LOAD 2
PUSH 0
ADD
LOADIND
PUSH 0
eq
not
BF 70
LOAD 0
PUSH 1
ADD
PUSH 45
STOREIND
LOAD 0
PUSH 3
ADD
DUP
LOAD 2
PUSH 0
ADD
LOADIND
PUSH 10
DIV
STOREIND
POP
JUMP 6
LOAD 2
PUSH 1
ADD
LOAD 2
PUSH 0
ADD
LOADIND
PUSH 10
DIV
STOREIND
PUSH 48
LOAD 2
PUSH 0
ADD
LOADIND
ADD
PUSH 10
LOAD 2
PUSH 1
ADD
LOADIND
MUL
SUB
OUT
JUMP 70
LOAD 2
PUSH 2
SUB
LOADIND
LOAD 2
PUSH 3
SUB
DUP
STORE 0
PUSH 2
ADD
LOADIND
STORE 2
JUMPIND
LOAD 0
PUSH 2
ADD
LOAD 2
STOREIND
LOAD 0
PUSH 3
ADD
STORE 2
LOAD 0
PUSH 3
ADD
STORE 0
LOAD 2
PUSH 0
ADD
LOADIND
PUSH 0
EQ
BF 109
PUSH 48
PUSH 0
ADD
OUT
JUMP 125
LOAD 0
PUSH 1
ADD
PUSH 125
STOREIND
LOAD 0
PUSH 3
ADD
DUP
LOAD 2
PUSH 0
ADD
LOADIND
STOREIND
POP
JUMP 6
LOAD 2
PUSH 2
SUB
LOADIND
LOAD 2
PUSH 3
SUB
DUP
STORE 0
PUSH 2
ADD
LOADIND
STORE 2
JUMPIND
LOAD 0
PUSH 2
ADD
LOAD 2
STOREIND
LOAD 0
PUSH 3
ADD
STORE 2
LOAD 0
PUSH 2
ADD
STORE 0
PUSH 10
OUT
PUSH 13
OUT
LOAD 2
PUSH 2
SUB
LOADIND
LOAD 2
PUSH 3
SUB
DUP
STORE 0
PUSH 2
ADD
LOADIND
STORE 2
JUMPIND
LOAD 0
PUSH 2
ADD
LOAD 2
STOREIND
LOAD 0
PUSH 3
ADD
STORE 2
LOAD 0
PUSH 4
ADD
STORE 0
LOAD 2
PUSH 1
ADD
PUSH 0
STOREIND
LOAD 2
PUSH 0
ADD
LOADIND
PUSH 1
SUB
DUP
LOAD 2
PUSH 1
ADD
LOADIND
FLIP
LT
BF 241
LOAD 2
PUSH 1
ADD
LOADIND
PUSH 0
eq
not
BF 213
PUSH 32
OUT
JUMP 213
LOAD 0
PUSH 1
ADD
PUSH 232
STOREIND
LOAD 0
PUSH 3
ADD
DUP
LOAD 1
PUSH 0
ADD
PUSH 1
MUL
ADD
LOADIND
STOREIND
POP
JUMP 84
LOAD 2
PUSH 1
ADD
DUP
LOADIND
PUSH 1
ADD
STOREIND
JUMP 194
POP
LOAD 0
PUSH 1
ADD
PUSH 248
STOREIND
JUMP 139
LOAD 2
PUSH 2
SUB
LOADIND
LOAD 2
PUSH 3
SUB
DUP
STORE 0
PUSH 2
ADD
LOADIND
STORE 2
JUMPIND
LOAD 1
PUSH 100
ADD
PUSH 0
STOREIND
PUSH 99
DUP
LOAD 1
PUSH 100
ADD
LOADIND
FLIP
LT
BF 304
LOAD 1
PUSH 0
ADD
PUSH 1
LOAD 1
PUSH 100
ADD
LOADIND
MUL
ADD
PUSH 500
PUSH 2
LOAD 1
PUSH 100
ADD
LOADIND
MUL
SUB
STOREIND
LOAD 1
PUSH 100
ADD
DUP
LOADIND
PUSH 1
ADD
STOREIND
JUMP 268
POP
LOAD 1
PUSH 100
ADD
PUSH 0
STOREIND
PUSH 99
DUP
LOAD 1
PUSH 100
ADD
LOADIND
FLIP
LT
BF 362
LOAD 1
PUSH 100
ADD
LOADIND
PUSH 0
eq
not
BF 330
PUSH 32
OUT
JUMP 330
LOAD 0
PUSH 1
ADD
PUSH 353
STOREIND
LOAD 0
PUSH 3
ADD
DUP
LOAD 1
PUSH 0
ADD
PUSH 1
LOAD 1
PUSH 100
ADD
LOADIND
MUL
ADD
LOADIND
STOREIND
POP
JUMP 84
LOAD 1
PUSH 100
ADD
DUP
LOADIND
PUSH 1
ADD
STOREIND
JUMP 311
POP
LOAD 0
PUSH 1
ADD
PUSH 369
STOREIND
JUMP 139
LOAD 1
PUSH 100
ADD
PUSH 0
STOREIND
PUSH 98
DUP
LOAD 1
PUSH 100
ADD
LOADIND
FLIP
LT
BF 499
LOAD 1
PUSH 101
ADD
LOAD 1
PUSH 100
ADD
LOADIND
PUSH 1
ADD
STOREIND
PUSH 99
DUP
LOAD 1
PUSH 101
ADD
LOADIND
FLIP
LT
BF 489
LOAD 1
PUSH 0
ADD
PUSH 1
LOAD 1
PUSH 100
ADD
LOADIND
MUL
ADD
LOADIND
LOAD 1
PUSH 0
ADD
PUSH 1
LOAD 1
PUSH 101
ADD
LOADIND
MUL
ADD
LOADIND
LT
NOT
BF 480
LOAD 1
PUSH 102
ADD
LOAD 1
PUSH 0
ADD
PUSH 1
LOAD 1
PUSH 100
ADD
LOADIND
MUL
ADD
LOADIND
STOREIND
LOAD 1
PUSH 0
ADD
PUSH 1
LOAD 1
PUSH 100
ADD
LOADIND
MUL
ADD
LOAD 1
PUSH 0
ADD
PUSH 1
LOAD 1
PUSH 101
ADD
LOADIND
MUL
ADD
LOADIND
STOREIND
LOAD 1
PUSH 0
ADD
PUSH 1
LOAD 1
PUSH 101
ADD
LOADIND
MUL
ADD
LOAD 1
PUSH 102
ADD
LOADIND
STOREIND
JUMP 480
LOAD 1
PUSH 101
ADD
DUP
LOADIND
PUSH 1
ADD
STOREIND
JUMP 394
POP
LOAD 1
PUSH 100
ADD
DUP
LOADIND
PUSH 1
ADD
STOREIND
JUMP 375
POP
LOAD 1
PUSH 100
ADD
PUSH 0
STOREIND
PUSH 99
DUP
LOAD 1
PUSH 100
ADD
LOADIND
FLIP
LT
BF 557
LOAD 1
PUSH 100
ADD
LOADIND
PUSH 0
eq
not
BF 525
PUSH 32
OUT
JUMP 525
LOAD 0
PUSH 1
ADD
PUSH 548
STOREIND
LOAD 0
PUSH 3
ADD
DUP
LOAD 1
PUSH 0
ADD
PUSH 1
LOAD 1
PUSH 100
ADD
LOADIND
MUL
ADD
LOADIND
STOREIND
POP
JUMP 84
LOAD 1
PUSH 100
ADD
DUP
LOADIND
PUSH 1
ADD
STOREIND
JUMP 506
POP
LOAD 0
PUSH 1
ADD
PUSH 564
STOREIND
JUMP 139
HALT
